package com.itheima.homework;

import java.util.Scanner;

public class HomeWork1 {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        System.out.println("请录入工人姓名:");
        String name = sc.nextLine();
        System.out.println("请录入工人工龄:");
        String age = sc.nextLine();
        Worker wk =new Worker(name,age);
        System.out.println("该工人对象的属性信息如下：");
        System.out.println("姓名:"+wk.getName());
        System.out.println("年龄:"+wk.getAge());
    }
}
